package com.itheima.a06myprintstream;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;

public class PrintStreamDemo2 {
    public static void main(String[] args) throws IOException {
        //熟悉字符打印流

        PrintWriter pw=new PrintWriter(new FileWriter("myio\\a.txt"),true);
        pw.println("Hello World");
        pw.print(22);
        pw.printf("Hello World%s","jjjj急急急");
        pw.close();

        System.out.println();
        PrintStream out = System.out;//调用out常量时相当于自动创建了打印流对象
        out.println();

    }
}
